package com.heima.admin.controller.v1;

import com.heima.admin.service.NewExamineService;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.dtos.NewExamineDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/v1/news")
public class NewExamineController {

    @Autowired
    private NewExamineService newExamineService;

    @PostMapping("/list_vo")
    public ResponseResult listVo(@RequestBody NewExamineDto dto) {
        return newExamineService.listVo(dto);
    }

    @GetMapping("/one_vo/{id}")
    public ResponseResult oneVo(@PathVariable("id") Integer id) {
        return newExamineService.oneVo(id);
    }

    @PostMapping("/auth_pass")
    public ResponseResult authPass(@RequestBody NewExamineDto dto) {
        return newExamineService.authPass(dto);
    }

    @PostMapping("/auth_fail")
    public ResponseResult authFail(@RequestBody NewExamineDto dto) {
        return newExamineService.authFail(dto);
    }

}
